home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap15 / dun15_2.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  1.3 KB  |  35 lines

  1. <DIV ID=banner STYLE="position: absolute; left: 32; top: 9;">
  2.   <IMG NAME=arrow SRC="arrow.gif" ALIGN=left>
  3.   <FONT FACE="Arial, Helvetica" SIZE=+2>
  4.     Exposing Page Elements in Communicator 4.0
  5.   </FONT>
  6. </DIV>
  7.  
  8. <BR><BR>
  9. <P>The <TT>DIV</TT> element is reflected as both
  10. <TT>document.layers['banner']</TT> and <TT>document.banner</TT> in
  11. Communicator 4.0.</P>
  12.  
  13. <P>The <TT>IMG</TT> element, when contained within the <TT>DIV</TT>
  14. element is reflected as <TT>document.banner.document.images['arrow']</TT>
  15. and <TT>document.banner.document.arrow</TT>.  It can also be accessed
  16. using the <TT>document.layers['banner']</TT> notation for the
  17. <TT>DIV</TT> parent layer.  Its reflected attributes include:</P>
  18.  
  19. <BLOCKQUOTE>
  20. <SCRIPT>
  21.    document.writeln("<B>name:</B> ");
  22.    document.writeln(document.banner.document.images['arrow'].name);
  23.    document.writeln("<BR>");
  24.    document.writeln("<B>src:</B> ");
  25.    document.writeln(document.layers['banner'].document.images['arrow'].src);
  26.    document.writeln("<BR>");
  27.    document.writeln("<B>width:</B> ");
  28.    document.writeln(document.banner.document.arrow.width);
  29.    document.writeln("<BR>");
  30.    document.writeln("<B>height:</B> ");
  31.    document.writeln(document.layers['banner'].document.arrow.height);
  32.    document.writeln("<BR>");
  33. </SCRIPT>
  34. </BLOCKQUOTE>
  35.